home *** CD-ROM | disk | FTP | other *** search
- PXFSETENV(3F) Last changed: 1-6-98
-
-
- NNAAMMEE
- PPXXFFSSEETTEENNVV - Sets environment variable pair
-
- SSYYNNOOPPSSIISS
- CCHHAARRAACCTTEERR*_n _n_a_m_e,, _n_e_w
- IINNTTEEGGEERR _l_e_n,, _n_a_m_e,, _l_e_n_n_e_w,, _i_o_v_e_r_w_r_i_t_e,, _i_e_r_r_o_r
- CCAALLLL PPXXFFSSEETTEENNVV ((_n_a_m_e,, _l_e_n_n_a_m_e,, _n_e_w,, _l_e_n_n_e_w,, _i_o_v_e_r_w_r_i_t_e,, _i_e_r_r_o_r))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- 7.2 F77 compiler.
-
- The PPXXFFSSEETTEENNVV routine uses the ppuutteennvv((33CC)) function to change a
- currently existing "name=value" pair or create a new name=value pair.
- The _n_a_m_e or _n_e_w arguments are stripped of trailing blanks if _l_e_n_n_a_m_e
- or _l_e_n_n_e_w are zero.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of valid arguments for this routine:
-
- _n_a_m_e An input character variable or array element containing the
- environment name value to be set.
-
- _l_e_n_n_a_m_e An input integer variable containing the character length of
- _n_a_m_e. If _l_e_n_n_a_m_e is zero, trailing blanks are removed.
-
- _n_e_w An input character variable or array element containing the
- new environment value for the name=value environment pair.
-
- _l_e_n_n_e_w An input integer variable containing the character length of
- _n_e_w. If _l_e_n_n_e_w is zero, trailing blanks are removed.
-
- _i_o_v_e_r_w_r_i_t_e
- An input integer variable containing a zero or nonzero
- number. When the value is zero, a name=value pair with the
- name value matching _n_a_m_e will not be replaced with a new
- name=_n_e_w pair.
-
- A nonzero _i_o_v_e_r_w_r_i_t_e value will replace the matching
- name=value pair with name=_n_e_w pair.
-
- _i_e_r_r_o_r An output integer variable that contains zero if the
- environment variable was changed or nonzero if PPXXFFSSEETTEENNVV was
- not successful.
-
- The PPXXFFSSEETTEENNVV routine may return any of the following error values:
-
- EEIINNVVAALL If _i_l_e_n is less than 0 or _l_e_n_n_a_m_e is greater than LLEENN((_p_a_t_h))
- or _l_e_n_n_e_w is less than 0 or _l_e_n_n_e_w is greater than LLEENN((_n_e_w)).
-
- EENNOOMMEEMM If PPXXFFSSEETTEENNVV is unable to obtain memory to copy _n_a_m_e and _n_e_w
- to a new name=value string.
-
- EEXXAAMMPPLLEESS
- In this example, PPXXFFSSEETTEENNVV sets the SSHHEELLLL environment value to
- //bbiinn//ccsshh.
-
- program testpxf
- character*10 name, val
- integer lenname, lenval, ioverw, ierr
- c set input arguments
- name='SHELL'
- ierr=0
- lenname=5
- val='/bin/csh'
- lenval=8
- ioverw=1
- CALL PXFSETENV(name,lenname,val,lenval,iover,ierr)
- c print input arguments
- print *,'name=-',name,'-'
- print *,'lenname=',lenname
- print *,'val=-',val,'-'
- print *,'lenval=',lenval
- print *,'iotherw=',iotherw
- c print output argument
- print *,'ierr=',ierr
- end
-
- SSEEEE AALLSSOO
- sseetteennvv(3C)
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
- 2165, for the printed version of this man page.
-
-